// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#fff');

// create tab group
var tabGroup = Titanium.UI.createTabGroup();

var win1 = Titanium.UI.createWindow({  
    title:'Home',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Home',
    window:win1
});

var label1 = Titanium.UI.createLabel({
	color:'#999',
	text:'Welcome to GTUG Zurich',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	top: 100,
	width:'auto'
});

var startImage = Ti.UI.createImageView({
	image: 'images/gtug.png',
	width: 250,
	height: 70,
	top:10
});

win1.add(label1);
win1.add(startImage);

//
// create controls tab and root window
//
var win2 = Titanium.UI.createWindow({  
    title:'Events',
    backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Events',
    window:win2
});

var label2 = Titanium.UI.createLabel({
	color:'#999',
	text:'Events coming soon...',
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});

win2.add(label2);

var win3 = Titanium.UI.createWindow({  
    title:'Tweets',
    backgroundColor:'#fff',
    url: 'tweets.js'
});

var tab3 = Titanium.UI.createTab({  
    icon:'KS_nav_ui.png',
    title:'Tweets',
    window:win3
});


//
//  add tabs
//
tabGroup.addTab(tab1);  
tabGroup.addTab(tab2);  
tabGroup.addTab(tab3);  


// open tab group
tabGroup.open();
